<?php defined('SYSPATH') or die('No direct access allowed.');

class Model_Api_V2_Car
{
    public static $_typeid = 3;

    private static $supplier_channel_id = 1;






    /**
     * 获取每日价格
     * @param $suit_id
     * @param $start_time
     * @param $end_time
     * @return array
     */
    public static function get_everyday_price($suit_id, $start_time, $end_time)
    {
        return DB::select('adultprice', 'day', 'number')
            ->from('car_suit_price')
            ->where('suitid', '=', $suit_id)
            ->and_where('supplier_channel_id', '=', self::$supplier_channel_id)
            ->and_where('day', '>=', $start_time)
            ->and_where('day', '<=', $end_time)
            ->and_where('adultprice', '>', 0)
            ->and_where('number', '!=', 0)
            ->group_by('day', 'suitid')
            ->order_by('day', 'asc')
            ->execute()
            ->as_array();
    }


}